.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.login-box {
  background: white;
  border-radius: 15px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  padding: 40px;
  width: 100%;
  max-width: 500px;
  text-align: center;
}

.login-box h2 {
  color: #333;
  margin-bottom: 30px;
  font-size: 28px;
  font-weight: 600;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 500;
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
}

/* 头像选择器样式 */
.avatar-selector {
  position: relative;
}

.select-avatar-btn {
  width: 100%;
  padding: 12px 16px;
  border: 2px dashed #667eea;
  border-radius: 8px;
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.select-avatar-btn:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: #764ba2;
}

.selected-avatar {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  background: #f8f9fa;
}

.selected-avatar img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #667eea;
}

.change-avatar-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.change-avatar-btn:hover {
  background: #764ba2;
}

.avatar-grid {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  padding: 15px;
  margin-top: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.avatar-option {
  cursor: pointer;
  transition: transform 0.2s ease;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
}

.avatar-option:hover {
  transform: scale(1.1);
  border-color: #667eea;
}

.avatar-option img {
  width: 100%;
  height: auto;
  display: block;
}

.submit-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
  margin-top: 10px;
}

.submit-btn:hover {
  transform: translateY(-2px);
}

.submit-btn:active {
  transform: translateY(0);
}

.message {
  padding: 12px 16px;
  border-radius: 8px;
  margin: 20px 0;
  font-weight: 500;
}

.message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.toggle-mode {
  margin-top: 20px;
}

.toggle-btn {
  background: none;
  border: none;
  color: #667eea;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.toggle-btn:hover {
  color: #764ba2;
}

.local-users {
  margin-top: 30px;
  text-align: left;
}

.local-users h3 {
  color: #333;
  margin-bottom: 15px;
  font-size: 18px;
}

.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.user-card {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 15px;
  border: 1px solid #e9ecef;
  transition: transform 0.2s ease;
}

.user-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.user-avatar {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.user-avatar img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.default-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
}

.user-info {
  text-align: center;
}

.username {
  font-weight: 600;
  color: #333;
  margin: 5px 0;
  font-size: 16px;
}

.password {
  color: #666;
  margin: 5px 0;
  font-size: 14px;
}

@media (max-width: 600px) {
  .login-box {
    padding: 30px 20px;
    margin: 20px;
  }

  .users-grid {
    grid-template-columns: 1fr;
  }

  .avatar-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .selected-avatar {
    flex-direction: column;
    gap: 10px;
  }
}
